package com.heima.user.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.AuthDto;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.heima.user.service.IApUserRealnameService;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * APP实名认证信息表 前端控制器
 * </p>
 *
 * @author syl
 * @since 2022-06-27
 */
@RestController
@RequestMapping("/api/v1/user_realname")
@Api(tags = "APP实名认证信息表接口")
@CrossOrigin
public class ApUserRealnameController{

    @Autowired
    private IApUserRealnameService apUserRealnameService;

    /**
     * 按照状态查询用户认证列表
     * @param authDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto authDto){
        return apUserRealnameService.listByStatus(authDto);
    }
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto authDto){
        return apUserRealnameService.authFail(authDto);
    }
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto authDto){
        return apUserRealnameService.authPass(authDto);
    }
}
